<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.anhry.app.safety.util.Util"/>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>企业类型调整</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath+Util.SKIN%>/css/right.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="<%=basePath%>/js/dbdialog/lhgdialog.min.js<%=Util.LHGDIALOG%>"></script>
	<script type="text/javascript" src="<%=basePath%>/js/check_jquery.js"></script>
	<script type="text/javascript" src="<%=path%>/js/selected.js"></script>
	<script type="text/javascript" src="<%=path%>/js/util.js"></script>
	
	<script type="text/javascript">
		$(function(){
			initSelArray('bselect2:1');
			var cMaxType = '${corp.tbCorpType.id}';
			var cMinType = '${corp.tbCorpTypeMin.id}';
			if(null!=cMaxType && cMaxType!=""){
				changeType(cMaxType);
			}
			if(cMinType!=null && cMinType!=""){
	   			selected('bselect2',cMinType);	//加载选中项
	   		}
	   		
		});
		function changeType(maxid){
	   		var urls="<%=basePath%>/util/data_getCorpType.action?cMaxType="+maxid;
	   		buildSelect(maxid, 'bselect2',urls,'1');
	   	}
	  	function fnSearch(){
	  		var api = frameElement.api, W = api.opener;
		  	W.form1.submit();
      	}
      	function fnSubmit(){
	    	var type1 = document.getElementById('bselect1').value;
	    	var type2 = document.getElementById('bselect2').value;
	   		if(type1==null || type1=="" || type2==null || type2==""){
	   			msgDialog('请选择企业类型！', 'alert.gif');
	   			return false;
	   		}
	   		return true;
      	}
	</script>
	<style>
		* html body {padding:0px 0px 6px 0px;}
		.menuitem {float:left;POSITION: absolute; VISIBILITY: hidden;}
		.menuitem1 {float:left;POSITION: static; VISIBILITY: visible;}
	</style>
  </head>
  
  <body>
	<div  class="body-box">
		<div id="container">
			<form action="<%=basePath%>/fjpd/_corpTypeSet.action" method="post" name="form1">
		    	<table border="0" cellpadding="0" cellspacing="0" class="mytable">
			   		<thead>
				    	<tr class="fixedHeaderTr">
				     		<th>${corp.corpName }</th>
				    	</tr>
			   		</thead>
				   	<tbody>
				   		<tr>
				     		<td align="center">
					     		<s:select list="typeList" name="maxTypeId" value="%{corp.tbCorpType.id}" listKey="id" listValue="typeName" headerKey="" headerValue="请选择" theme="simple" cssStyle="width:155px;margin-left:5px;" id="bselect1" onchange="changeType(this.value);"></s:select> <SPAN class="note4">*</SPAN>
					   			<s:select list="#{}" name="minTypeId" headerKey="" headerValue="请选择" theme="simple" cssStyle="width:155px;margin-left:5px;" id="bselect2"></s:select><SPAN class="note4">*</SPAN>
				     		</td>
				    	</tr>
				    	<tr>
				     		<td align="center"><input type="submit" name="btntj" class="link_input" id="btnSubmit1" value="提 交" onclick="return fnSubmit();"></td>
				    	</tr>
				   	</tbody>
			  	</table>
				<input type="hidden" name="corpId" value="${corp.id }">
			</form>
		</div>
	</div>
  </body>
  <s:if test="%{tip!=null}">
	<script>
		msgDialog('${tip}', 'success.gif');
		fnSearch();
	</script>
  </s:if>
</html>
